﻿<%@ Page Title="" Language="C#" MasterPageFile="~/QCTT/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="QuanLyNguoiDung.aspx.cs" Inherits="NS_QuangCaoTiepThi.QCTT.Admin.QuanLyNguoiDung" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div>
    <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" 
        AutoPostBack="True" onactivetabchanged="TabContainer1_ActiveTabChanged">
        <asp:TabPanel runat="server" ID="tabQuanLyNguoiDung" HeaderText="Quản lý người dùng">
            <ContentTemplate>
                <asp:Label ID="lblMaNguoiDung" runat="server" Text="Mã người dùng"></asp:Label>
                <br />
                <asp:TextBox ID="txtMaNguoiDung" runat="server"></asp:TextBox>
                <br />
                <asp:Label ID="lblTenNguoiDung" runat="server" Text="Tên người dùng"></asp:Label>
                <br />
                <asp:TextBox ID="txtTenNguoiDung" runat="server"></asp:TextBox>
                <br />
                <asp:Label ID="lblMatKhau" runat="server" Text="Mật khẩu"></asp:Label>
                <br />
                <asp:TextBox ID="txtMatKhau" runat="server" TextMode="Password"></asp:TextBox>
                <br />
                <asp:Label ID="lblMatKhauNhapLai" runat="server" Text="Mật khẩu nhập lại"></asp:Label>
                <br />
                <asp:TextBox ID="txtMatKhauNhapLai" runat="server" TextMode="Password"></asp:TextBox>
                <br />
                <asp:Label ID="lblMaPhong_" runat="server" Text="Mã phòng"></asp:Label>
                <asp:ComboBox ID="cmbMaPhong" runat="server" MaxLength="0"></asp:ComboBox>
                <asp:Label ID="lblMaChucVu_" runat="server" Text="Mã chức vụ"></asp:Label>
                <asp:ComboBox ID="cmbMaChucVu" runat="server" MaxLength="0"></asp:ComboBox>
                <asp:Label ID="lblMaLoaiNguoiDung_" runat="server" Text="Mã loại người dùng"></asp:Label>
                <asp:ComboBox ID="cmbMaLoaiNguoiDung" runat="server" MaxLength="0"></asp:ComboBox>
                <asp:Button ID="btnThemNguoiDung" runat="server" Text="Thêm" Width="100px" 
                    onclick="btnThemNguoiDung_Click" />
                <br />
                <asp:GridView ID="gvDanhSachNguoiDung" runat="server" 
                    Width="100%"
                    AllowPaging="true"
                    AutoGenerateColumns="False" 
                    DataKeyNames="MaNguoiDung" 
                    onpageindexchanging="gvDanhSachNguoiDung_PageIndexChanging" 
                    onrowcancelingedit="gvDanhSachNguoiDung_RowCancelingEdit" 
                    onrowdatabound="gvDanhSachNguoiDung_RowDataBound" 
                    onrowdeleting="gvDanhSachNguoiDung_RowDeleting" 
                    onrowediting="gvDanhSachNguoiDung_RowEditing" 
                    onrowupdating="gvDanhSachNguoiDung_RowUpdating">
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <div>
                                    <asp:Label ID="lblMaNguoiDung_" runat="server" Text="Mã người dùng"></asp:Label>
                                    <br />
                                    <asp:TextBox ID="txtMaNguoiDung_" runat="server" Enabled="False" 
                                        Text='<%# Eval("MaNguoiDung") %>'></asp:TextBox>
                                    <br />
                                    <asp:Label ID="lblTenNguoiDung" runat="server" Text="Tên người dùng"></asp:Label>
                                    <br />
                                    <asp:TextBox ID="txtTenNguoiDung" runat="server" Text='<%# Eval("TenNguoiDung") %>'></asp:TextBox>
                                    <br />
                                    <asp:Label ID="lblMatKhau" runat="server" Text="Mật khẩu"></asp:Label>
                                    <br />
                                    <asp:TextBox ID="txtMatKhau" runat="server" TextMode="Password" ></asp:TextBox>
                                    <asp:HiddenField ID="hfMatKhau" runat="server" Value='<%# Eval("MatKhau") %>' />
                                    <br />
                                    <asp:Label ID="lblMatKhauNhapLai" runat="server" Text="Mật khẩu nhập lại"></asp:Label>
                                    <br />
                                    <asp:TextBox ID="txtMatKhauNhapLai" runat="server" TextMode="Password" ></asp:TextBox>
                                    <asp:HiddenField ID="hfMatKhauNhapLai" runat="server" Value='<%# Eval("MatKhau") %>' />
                                    <br />
                                    <asp:Label ID="lblMaPhong" runat="server" Text="Mã phòng"></asp:Label>
                                    <asp:ComboBox ID="cmbMaPhong" runat="server"></asp:ComboBox>
                                    <asp:Label ID="lblMaChucVu" runat="server" Text="Mã chức vụ"></asp:Label>
                                    <asp:ComboBox ID="cmbMaChucVu" runat="server"></asp:ComboBox>
                                    <asp:Label ID="lblMaLoaiNguoiDung" runat="server" Text="Mã loại người dùng"></asp:Label>
                                    <asp:ComboBox ID="cmbMaLoaiNguoiDung" runat="server"></asp:ComboBox>
                                </div>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:CommandField ShowEditButton="True" />
                        <asp:CommandField ShowDeleteButton="True" />
                    </Columns>
                </asp:GridView>
            </ContentTemplate>
        </asp:TabPanel>
        <asp:TabPanel ID="tabQuanLyPhong" runat="server" HeaderText="Quản lý phòng">
            <ContentTemplate>
                <asp:Label ID="lblMaPhong" runat="server" Text="Mã phòng"></asp:Label>
                <br />
                <asp:TextBox ID="txtMaPhong" runat="server"></asp:TextBox>
                <br />
                <asp:Label ID="lblTenPhong" runat="server" Text="Tên phòng"></asp:Label>
                <br />
                <asp:TextBox ID="txtTenPhong" runat="server"></asp:TextBox>
                <br />
                <asp:Button ID="btnThemPhong" runat="server" Text="Thêm" Width="100px" 
                    onclick="btnThemPhong_Click" />
                <br />
                <asp:GridView ID="gvDanhSachPhong" runat="server" 
                    Width="100%"
                    AllowPaging="True" 
                    AutoGenerateColumns="False"
                    DataKeyNames="MaPhong"
                    OnPageIndexChanging="gvDanhSachPhong_PageIndexChanging" 
                    OnRowCancelingEdit="gvDanhSachPhong_RowCancelingEdit" 
                    OnRowDeleting="gvDanhSachPhong_RowDeleting" 
                    OnRowEditing="gvDanhSachPhong_RowEditing" 
                    OnRowUpdating="gvDanhSachPhong_RowUpdating">
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <div>
                                    <asp:Label ID="lblMaPhong" runat="server" Text="Mã phòng"></asp:Label>
                                    <br />
                                    <asp:TextBox ID="txtMaPhong" runat="server" Enabled="False" 
                                        Text='<%# Eval("MaPhong") %>'></asp:TextBox>
                                    <br />
                                    <asp:Label ID="lblTenPhong" runat="server" Text="Tên phòng"></asp:Label>
                                    <br />
                                    <asp:TextBox ID="txtTenPhong" runat="server" Text='<%# Eval("TenPhong") %>'></asp:TextBox>
                                </div>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:CommandField ShowEditButton="True" />
                        <asp:CommandField ShowDeleteButton="True" />
                    </Columns>
                </asp:GridView>
            </ContentTemplate>
        </asp:TabPanel>
        <asp:TabPanel ID="tabQuanLyChucVu" runat="server" HeaderText="Quản lý chức vụ">
            <ContentTemplate>
                <asp:Label ID="lblMaChucVu" runat="server" Text="Mã chức vụ"></asp:Label>
                <br />
                <asp:TextBox ID="txtMaChucVu" runat="server"></asp:TextBox>
                <br />
                <asp:Label ID="lblTenChucVu" runat="server" Text="Tên chức vụ"></asp:Label>
                <br />
                <asp:TextBox ID="txtTenChucVu" runat="server"></asp:TextBox>
                <br />
                <asp:Button ID="btnThemChucVu" runat="server" Text="Thêm" Width="100px" 
                    onclick="btnThemChucVu_Click" />
                <br />
                <asp:GridView ID="gvDanhSachChucVu" runat="server" 
                    Width="100%"
                    AllowPaging="true"
                    AutoGenerateColumns="False" 
                    DataKeyNames="MaChucVu" 
                    onpageindexchanging="gvDanhSachChucVu_PageIndexChanging" 
                    onrowcancelingedit="gvDanhSachChucVu_RowCancelingEdit" 
                    onrowdeleting="gvDanhSachChucVu_RowDeleting" 
                    onrowediting="gvDanhSachChucVu_RowEditing" 
                    onrowupdating="gvDanhSachChucVu_RowUpdating">
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <div>
                                    <asp:Label ID="lblMaChucVu" runat="server" Text="Mã chức vụ"></asp:Label>
                                    <br />
                                    <asp:TextBox ID="txtMaChucVu" runat="server" Enabled="False" 
                                        Text='<%# Eval("MaChucVu") %>'></asp:TextBox>
                                    <br />
                                    <asp:Label ID="lblTenChucVu" runat="server" Text="Tên chức vụ"></asp:Label>
                                    <br />
                                    <asp:TextBox ID="txtTenChucVu" runat="server" Text='<%# Eval("TenChucVu") %>'></asp:TextBox>
                                </div>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:CommandField ShowEditButton="True" />
                        <asp:CommandField ShowDeleteButton="True" />
                    </Columns>
                </asp:GridView>
            </ContentTemplate>
        </asp:TabPanel>
        <asp:TabPanel ID="tabQuanLyLoaiNguoiDung" runat="server" HeaderText="Quản lý loại người dùng">
            <ContentTemplate>
                <asp:Label ID="lblMaLoaiNguoiDung" runat="server" Text="Mã loại người dùng"></asp:Label>
                <br />
                <asp:TextBox ID="txtMaLoaiNguoiDung" runat="server"></asp:TextBox>
                <br />
                <asp:Label ID="lblTenLoaiNguoiDung" runat="server" Text="Tên loại người dùng"></asp:Label>
                <br />
                <asp:TextBox ID="txtTenLoaiNguoiDung" runat="server"></asp:TextBox>
                <br />
                <asp:Button ID="btnThemLoaiNguoiDung" runat="server" Text="Thêm" Width="100px" 
                    onclick="btnThemLoaiNguoiDung_Click" />
                <br />
                <asp:GridView ID="gvDanhSachLoaiNguoiDung" runat="server" 
                    Width="100%"
                    AllowPaging="true"
                    AutoGenerateColumns="False"
                    DataKeyNames="MaLoaiNguoiDung" 
                    OnPageIndexChanging="gvDanhSachLoaiNguoiDung_PageIndexChanging" 
                    OnRowCancelingEdit="gvDanhSachLoaiNguoiDung_RowCancelingEdit" 
                    OnRowDeleting="gvDanhSachLoaiNguoiDung_RowDeleting" 
                    OnRowEditing="gvDanhSachLoaiNguoiDung_RowEditing" 
                    OnRowUpdating="gvDanhSachLoaiNguoiDung_RowUpdating">
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <div>
                                    <asp:Label ID="lblMaLoaiNguoiDung" runat="server" Text="Mã loại người dùng"></asp:Label>
                                    <br />
                                    <asp:TextBox ID="txtMaLoaiNguoiDung" runat="server" Enabled="False" 
                                        Text='<%# Eval("MaLoaiNguoiDung") %>'></asp:TextBox>
                                    <br />
                                    <asp:Label ID="lblTenLoaiNguoiDung" runat="server" Text="Tên loại người dùng"></asp:Label>
                                    <br />
                                    <asp:TextBox ID="txtTenLoaiNguoiDung" runat="server" Text='<%# Eval("TenLoaiNguoiDung") %>'></asp:TextBox>
                                </div>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:CommandField ShowEditButton="True" />
                        <asp:CommandField ShowDeleteButton="True" />
                    </Columns>
                </asp:GridView>
            </ContentTemplate>
        </asp:TabPanel>
    </asp:TabContainer>
</div>
</asp:Content>
